1. Field
Example embodiments of the present invention relate to a storage medium storing a digital data correction program and a digital data correction apparatus. More particularly, example embodiments of the present invention relates to a storage medium storing a digital data correction program and a digital data correction apparatus that correct digital data outputted from a device that converts an output value from a sensor that outputs an analog value, into digital data and outputs the digital data.
2. Description of the Related Art
For example, when a device that converts an output value (analog value) from a sensor, such as a gyroscope, that outputs an angular velocity in an analog value into digital integer value data and outputs the digital integer value data is used in a controller of a game machine that is operated by a person holding it with his/her hand, association between analog values and digital integer value data and an analog value indicating that the angular velocity is zero are defined in advance. When digital integer value data obtained from the device is smaller than digital integer value data associated with the analog value indicating that the angular velocity is zero, the data is recognized as a negative angular velocity, and when larger, the data is recognized as a positive angular velocity.
However, the device that converts an output value outputted from a sensor that outputs an analog value into digital integer value data in the above-described manner has problems such as those shown below.
First, a deviation occurs in association between an output value (analog value) outputted from the sensor that outputs an analog value and digital integer value data obtained by converting the analog value. For example, given that the sensor voltage for a state in which the sensor is stationary (the angular velocity is zero) is 2.9 V, when a voltage obtained from the sensor is converted into digital integer value data, voltages in a range of 2.4 V (=2.9−0.5) to 3.4 V (=2.9+0.5) should be converted into integer value data indicating that the angular velocity is zero but voltages in the range are not always converted into integer value data indicating that the angular velocity is zero, due to individual differences between sensors and the like, and voltages in a range of, for example, 2.0 V (=2.9−0.9) to 3.0 V (=2.9+0.1) may be converted into integer value data indicating that the angular velocity is zero.
As a result, in the case of an ideal environment/condition where voltages in the range of 2.4 V (=2.9−0.5) to 3.4 V (=2.9+0.5) are converted into integer value data indicating that the angular velocity is zero, in whichever direction the voltage moves from 2.9 V, when the voltage is changed by an identical amount of “0.5 V”, the integer value data is changed by “+1” or “−1”. On the other hand, in the case of an environment/condition where voltages in the range of 2.0 V (=2.9−0.9) to 3.0 V (=2.9+0.1) are converted into integer value data indicating that the angular velocity is zero, a phenomenon occurs that while the integer value data is not decremented unless a change of 0.9 V is made on the negative side, the integer value data is incremented when a change of only 0.1 V is made on the positive side. That is, a deviation has occurred in association between an output value (analog value) outputted from the sensor that outputs an analog value and digital integer value data obtained by converting the analog value.
The second problem is a temperature drift problem. For example, by a change in the temperature of an environment where a game is played, the sensor voltage for a state in which the sensor is stationary (the angular velocity is zero) changes during the use of the controller. For example, an event occurs that the voltage indicating a stationary state is 2.9 V up until a certain point in time but is changed to 3.3 V at some point in time. Therefore, during game play, despite the fact that the controller, i.e., the gyroscope, is stationary, integer value data indicating as if in move is outputted.
Related art that can deal with the first problem of analog/digital conversion is disclosed in Japanese Unexamined Patent Publication No. 11-118651 [G01L19/08].
In a digital manometer described as conventional art in Japanese Unexamined Patent Publication No. 11-118651, when an input value fluctuates greater than a predetermined specified value, the input value is outputted as it is as an output value, and when fluctuation in input value is less than or equal to the predetermined specified value, input values are accumulated and averaged and the averaged value is outputted.
In the related art of Japanese Unexamined Patent Publication No. 11-118651, since a certain number of input values are targeted for averaging, when a certain small number of input values are averaged, the accuracy of an output value lowers. When, on the other hand, the number of input values to be averaged is increased, trackability becomes worse. For example, when the state is changed from one in which fluctuation in input value exceeds the specified value to one in which fluctuation in input value is smaller than the specified value, a large number of input values that are greater than the specified value are targeted for averaging and accordingly an averaged output value may become larger than the actual value.